<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-boxinfoDoor-add">
        <input type="hidden" name="boxGuid" th:value="${boxguid}"/>
        <input type="hidden" name="doorStatus" th:value="0"/>
        <div class="form-group">
            <label class="col-sm-3 control-label">柜口分组：</label>
            <div class="col-sm-8">
                <input id="doorFz" name="doorFz" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">柜口编号：</label>
            <div class="col-sm-8">
                <input id="doorBh" name="doorBh" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">柜口大小：</label>
            <div class="col-sm-8">
                <select id="doorType" name="doorType" class="form-control m-b"
                        th:with="type=${@dict.getType('ebox_door_size')}">
                    <option th:each="dict : ${type}" th:text="${dict['dictLabel']}"
                            th:value="${dict['dictValue']}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">是否收费：</label>
            <div class="col-sm-8">
               <select id="doorSfsf" name="doorSfsf" class="form-control">
						<option value ="0">不收费</option>
						<option value ="1">收费</option>
					</select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">收费金额：</label>
            <div class="col-sm-8">
                <input id="doorSfje" name="doorSfje" class="form-control" type="text" value="">
            </div>
        </div>
         
        <div class="form-group">
            <label class="col-sm-3 control-label">柜口状态：</label>
            <div class="col-sm-8">
                <select id="doorZt" name="doorZt" class="form-control m-b"
                        th:with="type=${@dict.getType('ebox_door_zt')}">
                    <option th:each="dict : ${type}" th:text="${dict['dictLabel']}"
                            th:value="${dict['dictValue']}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <div class="form-control-static col-sm-offset-9">
                <button type="submit" class="btn btn-primary">提交</button>
                <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
            </div>
        </div>
    </form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
    var prefix = ctx + "ebox/boxinfoDoor"
    $("#form-boxinfoDoor-add").validate({
        rules: {
            doorFz: {
                required: true
            },
            doorBh: {
                required: true
            }
        },
        submitHandler: function (form) {
            $.operate.saveAndReloadTableOnly(prefix + "/add", $('#form-boxinfoDoor-add').serialize());
        }
    });
</script>
</body>
</html>
